package com.teapos.core;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import com.teapos.util.ThreadLocalUtil;

public class DynamicDataSource extends AbstractRoutingDataSource{

	@Override
	protected Object determineCurrentLookupKey() {
		//System.err.println("数据源："+ThreadLocalUtil.get("datasource"));
		return ThreadLocalUtil.get("datasource");
	}

}
